package com.deli.springboot.mapper;

/**
 * @Author: xudeli
 * @Description: 定义增删改查的接口
 * @CreateDate: 2018/4/23 0:03
 **/
public interface IBaseMapper<T> {
    /**
     * 插入数据
     * @param object
     * @return int类型
     * @throws Exception
     */
    public int insert(T object) throws Exception;

    /**
     * 根据主键修改数据
     * @param object
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(T object) throws Exception;

    /**
     * 选择性修改数据
     * @param object
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(T object) throws Exception;

    /**
     * 根据对象查询一条数据
     * @param object
     * @return
     * @throws Exception
     */
    public T selectOne(T object) throws Exception;

    /**
     * 查询总数量
     * @param i
     * @return
     * @throws Exception
     */
    public int count(int i) throws Exception;


}
